package gitee.derumin.lib_for_derumin.tests;

import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.passive.AllayEntity;
import net.minecraft.item.Item;
import net.minecraft.item.Items;

import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class TestConfig {
    public byte byte1 = 1;
    public byte byteBig = Byte.MAX_VALUE;
    public boolean bol = true;
    public char chara = 'a';
    public double doubles = 1234.123456789123456789;
    public double doubleMax = Double.MAX_VALUE;
    public float float1 = (float) 1234567890.25;
    public float flaotm = Float.MAX_VALUE;
    public int intm = Integer.MAX_VALUE;
    public long lom = Long.MAX_VALUE;
    public Item item = Items.DIAMOND;
    public Block block = Blocks.GRASS_BLOCK;
    public EntityType<AllayEntity> entityType = EntityType.ALLAY;
    public Path testPath = FabricLoader.getInstance().getGameDir().resolve("test");
    public Map<Map<Path[], List<Integer>>, Integer[]> tricky = new HashMap<>();
    public Map<String, Integer[]> easy = new HashMap<>();
    TestConfig ini(){
        Map<Path[], List<Integer>> m1 = new HashMap<>();
        List<Integer> l1 = new ArrayList<>();
        l1.add(1);
        l1.add(2);
        l1.add(3);
        m1.put(new Path[]{testPath.resolve("tt1"), testPath.resolve("tt2")}, l1);
        Map<Path[], List<Integer>> m2 = new HashMap<>();
        List<Integer> l2 = new ArrayList<>();
        l2.add(11);
        l2.add(22);
        l2.add(33);
        m2.put(new Path[]{testPath.resolve("tt3"), testPath.resolve("tt4")}, l2);
        tricky.put(m1, new Integer[]{12,13,14,15});
        tricky.put(m2, new Integer[]{22,23,24,25});
        easy.put("easy!", new Integer[]{1,2,3,4,5});
        easy.put("notHard!", new Integer[]{4,5,6,7,8});
        easy.put("really", new Integer[]{11,12,13,14,15});
        return this;
    }
}
